const defaultState = {
    inputValue:'weite something',
    list: [
        '起床吃早餐',
        '看书',
        '上课'
    ]
}
export default (state = defaultState,action) => {
    // reducer里面只能接受state，不能改变state
    if(action.type === 'changeinput') {
        let newState = JSON.parse(JSON.stringify(state));
        newState.inputValue=action.value;
        return newState;
    }
    if(action.type === 'additem'){
        
    }
    return state
}